
<%@page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>

<c:url var="urlForm" value="/folhas/pesquisar" />
<c:url var="urlIncluir" value="/movimentacao/pre_incluir" />

<!-- Begin page content -->
<div class="container">
	<div class="page-header">
		<h3>Folhas de Pagamento</h3>
	</div>

	<form method="GET" action="${urlIncluir}" id="form-incluir"></form>

	<form:form method="POST" class="form-horizontal" role="form"
		action="${urlForm}">
		<div class="form-group">
			<div class="form-group">
				<label for="inputMes" class="col-lg-1 control-label">Mês</label>
				<div class="col-lg-2">
					<select class="form-control" name="mes">
						<option value="${null}">Selecione</option>
						<c:forEach var="mes" items="${mes}">
							<option value="${mes.codigo}">${mes.descricao}</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label for="inputAno" class="col-lg-1 control-label">Ano</label>
				<div class="col-lg-2">
					<input type="text" class="form-control" id="inputAno"
						placeholder="Digite o Ano" name="ano" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-1 control-label"></label>
				<div class="col-lg-6">
					<button type="submit" class="btn btn-success"
						id="btnPesquisarPessoaPorNome">Pesquisar</button>
					&nbsp; 
					<c:if test="${empty movimentacoes}">
						<a href="#" id="btn-incluir" class="btn btn-primary">Nova
							Movimentação</a>
					</c:if>
				</div>
			</div>
		</div>
	</form:form>

	<div class="alert alert-danger" id="painelErro">
		<span><strong>Erro:</strong><span id="mensagemErro"></span> </span>
	</div>
	<div id="divList">
		<tiles:insertAttribute name="list" />
	</div>

	<script type="text/javascript"
		src="<c:url value="/resources/js/folha/folhas.js" />"></script>

</div>
